function importExcel(fileObj, formObj,eBatchId,url) {
    if (eBatchId==null||eBatchId==''){
        layer.msg('请选择考试批次后导入!');
    }else {
        var fileUrl = fileObj.val();
        var suffix = fileUrl.substr(fileUrl.lastIndexOf(".")).toLowerCase();//获得文件后缀名
        if (suffix == '.xls' || suffix == '.xlsx') {
            if (fileUrl) {
                formObj.ajaxSubmit({
                    type: "post",
                    url: url,
                    data: {userSource: eBatchId},
                    dataType: "json",
                    success: function (data) {
                        console.log("data",data);
                        if (data.code == 0) {
                            parent.layer.msg("导入成功");
                            parent.reLoad();
                            var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
                            parent.layer.close(index);
                            // $('#exampleTable').bootstrapTable('refresh');
                        } else if (data.code ==41304 ) {
                            layer.confirm('是否下载错误报告？', {
                                btn1:function(index){
                                    window.location.href = '/synthesize/resultEnter/importError';
                                    layer.close(index)
                                }
                            });
                        } else{
                            layer.msg(data.msg);
                        }
                    }, error: function (XMLHttpRequest, textStatus, errorThrown) {
                        console.log(XMLHttpRequest, textStatus, errorThrown)
                        layer.msg('出错了!');
                    }
                });
            } else {
                layer.msg('上传的文件不可为空');
                // parent.$.messager.alert('警告', "上传的文件不可为空", 'warning');
            }
        } else {
            layer.msg('请上传正确的Excel表格!');
            // $.messager.alert('警告', "", 'warning');
        }
    }
}